/*
 * @Author: linyi
 * @Date: 2019-01-03 14:18:28
 * @Last Modified by: linyi
 * @Last Modified time: 2019-03-14 09:49:57
 */

import React, { Component } from 'react'
import {
  Form, Button, Input, DatePicker, Select,
} from 'antd'
import '../style/Form.scss'

class App extends Component {
  constructor() {
    super()
    this.state = {}
  }

  render() {
    const {
      form: { getFieldDecorator },
    } = this.props

    return (
      <Form className="common-filter-form" layout="inline">
        <Form.Item label="退货申请号">
          {getFieldDecorator('fundNumber')(<Input placeholder="请输入退货申请号" />)}
        </Form.Item>
        <Form.Item label="订单号码">
          {getFieldDecorator('orderNumber')(<Input placeholder="请输入订单号" />)}
        </Form.Item>
        <Form.Item label="退货申请时间">
          {getFieldDecorator('range-picker')(<DatePicker.RangePicker />)}
        </Form.Item>
        <Form.Item label="订单状态">
          {getFieldDecorator('orderStatus')(
            <Select>
              <Select.Option value="">全部</Select.Option>
            </Select>,
          )}
        </Form.Item>
        <Form.Item className="form-btns">
          <Button
            type="primary"
            className="mr10"
            onClick={() => this.props.handleSearchParams(this.props.form.getFieldsValue())}
          >
            查询
          </Button>
          <Button onClick={() => this.props.form.resetFields()}>重置</Button>
        </Form.Item>
      </Form>
    )
  }
}
export default Form.create()(App)
